---@class Table_GlobalHelpItem
local Table_GlobalHelpItem = class("Table_GlobalHelpItem");

function Table_GlobalHelpItem:ctor()
    self.Id = 0;    --唯一ID
    self.Title = 0;    --对话标题ID
    self.ContentId = 0;    --内容ID
    self.BtnName = "";    --按钮文本ID
    self.TapClose = false;    --是否显示关闭
end

function Table_GlobalHelpItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Title = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ContentId = tonumber(self.temp); end
    self.BtnName = reader:ReadString();
    self.TapClose = reader:ReadBool();
    self.temp = nil;
end

---@class Table_GlobalHelpMgr : IDataMgr
local Table_GlobalHelpMgr = class("Table_GlobalHelpMgr", IDataMgr);

function Table_GlobalHelpMgr:FileName()
    return "Txt/GlobalHelp.txt";
end

---@return Table_GlobalHelpItem
function Table_GlobalHelpMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_GlobalHelpItem
function Table_GlobalHelpMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_GlobalHelpMgr:Load(reader)
    local item = Table_GlobalHelpItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_GlobalHelpMgr;